package com.edu.helloworld;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@SpringBootApplication
@Controller
public class HelloworldApplication {

    public static void main(String[] args) {
        SpringApplication.run(HelloworldApplication.class, args);
    }

    @ResponseBody
    @GetMapping("/index")
    public Map<String,String> index() {
        Map<String, String> map = new HashMap<>();
        map.put("a", "这个方法是我加的,其它的是向导生成的");
        map.put("b", "bbbb");
        return map;
    }
}
